﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Maintenance
{
    public partial class FrmCheckPwd : Form
    {
        public FrmCheckPwd()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            CheckPwd();
        }

        private void tbPwd_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyValue == 13)
            {
                CheckPwd();
            }
        }

        private void CheckPwd()
        {
            if (tbPwd.Text == System.DateTime.Now.ToString("MMdd"))
            {
                this.DialogResult = DialogResult.Yes;
            }
            else
            {
                MessageBox.Show("密码校验失败！");
            }
        }
    }
}